
#ifndef _DownlinkDeframing_H_
#define _DownlinkDeframing_H_


#include "DataTypeDef_F28.h"



#ifdef __cplusplus
extern "C" {
#endif


typedef struct {
        uint16 nStatus;
        uint16 nErrFlag;
}S_AMI_DECODER, *P_S_AMI_DECODER;

#define AMI_FRM_SEG_DAT					0
#define AMI_FRM_SEG_TYP					1


#define AMI_DECODER_ERR_NO_ERR          0
#define AMI_DECODER_ERR_BUF_OVL         1
#define AMI_DECODER_ERR_DLE_ERR         2
#define AMI_DECODER_ERR_TYP_ERR         3


#define AMI_DECODER_STA_IDLE            0
#define AMI_DECODER_STA_FRM_HEAD_CAP    1
#define AMI_DECODER_STA_DAT_RCV         2
#define AMI_DECODER_STA_DLE             3




void AMI_DecoderInit(void);
void AMI_DecoderProc(uint16 nRcvDat);



#ifdef __cplusplus
}
#endif




#endif // _DownlinkDeframing_H_

